package com.edz.application.retrofit;


import com.edz.application.model.GameListEntity;
import com.edz.application.model.ResultEntity;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

public interface ApiService {
    @GET("operat/getGameList")
    Call<ResultEntity> getGameList();

    /**
     * 获取地址
     *
     * @param params
     * @return
     */
    @GET("delivery/page")
    Call<ResultEntity> getDelivery(@QueryMap Map<String, String> params);

    /**
     * 新增地址
     *
     * @param params
     * @return
     */
    @POST("delivery/add")
    Call<ResultEntity> addDelivery(@QueryMap Map<String, String> params);

    /**
     * 设置默认地址
     *
     * @param params
     * @return
     */
    @POST("delivery/default")
    Call<ResultEntity> setDefaultDelivery(@QueryMap Map<String, String> params);

    /**
     * 删除地址
     *
     * @param deliveryId
     * @return
     */
    @POST("delivery/delete/{deliveryId}")
    Call<ResultEntity> deleteDelivery(@Path("deliveryId") String deliveryId);

    /**
     * 获取地址详情
     *
     * @param deliveryId
     * @return
     */
    @GET("delivery/detail/{deliveryId}")
    Call<ResultEntity> getDeliveryDetail(@Path("deliveryId") String deliveryId);

    /**
     * 编辑地址
     *
     * @param params
     * @return
     */
    @POST("delivery/edit")
    Call<ResultEntity> editDelivery(@QueryMap Map<String, String> params);

    /**
     * 获取Banner图
     *
     * @param params
     * @return
     */
    @GET("banner/get")
    Call<ResultEntity> getBanners(@QueryMap Map<String, String> params);

    /**
     * 获取首页商品数据
     *
     * @param params
     * @return
     */
    @GET("product/index")
    Call<ResultEntity> getProducts(@QueryMap Map<String, String> params);

    /**
     * 分页获取推荐商品
     *
     * @return
     */
    @GET("product/recommend")
    Call<ResultEntity> getRecommendProducts(@QueryMap Map<String, String> params);

    /**
     * 分页获取商品
     *
     * @param params
     * @return
     */
    @GET("product/page")
    Call<ResultEntity> getProductPage(@QueryMap Map<String, String> params);

    /**
     * 获取商品详情
     *
     * @param productNo
     * @return
     */
    @GET("product/detail/{productNo}")
    Call<ResultEntity> getProductDetail(@Path("productNo") String productNo);

    /**
     * 获取商品规格
     *
     * @param productNo
     * @return
     */
    @GET("product/spec/{productNo}")
    Call<ResultEntity> getProductDesc(@Path("productNo") String productNo);

    /**
     * 获取商品属性
     *
     * @param productNo
     * @return
     */
    @GET("product/property/{productNo}")
    Call<ResultEntity> getProductProperty(@Path("productNo") String productNo);

    /**
     * 获取订单
     *
     * @param params
     * @return
     */
    @GET("order/page")
    Call<ResultEntity> getOrderPage(@QueryMap Map<String, String> params);

    /**
     * 订单详情
     *
     * @param orderId
     * @param params
     * @return
     */
    @GET("order/detail/{orderId}")
    Call<ResultEntity> getOrderDetail(@Path("orderId") String orderId, @QueryMap Map<String, String> params);

    /**
     * 取消订单
     *
     * @param orderId
     * @return
     */
    @POST("order/cancel/{orderId}")
    Call<ResultEntity> cancelOrder(@Path("orderId") String orderId);

    /**
     * 确认收货
     *
     * @param orderId
     * @param params
     * @return
     */
    @GET("order/finish/{orderId}")
    Call<ResultEntity> finishOrder(@Path("orderId") String orderId, @QueryMap Map<String, String> params);

    /**
     * 获取评论
     *
     * @param params
     * @return
     */
    @GET("comment/page")
    Call<ResultEntity> getCommentPage(@QueryMap Map<String, String> params);

    /***
     * 新增评论
     * @param params
     * @return
     */
    @POST("comment/add")
    Call<ResultEntity> addComment(@QueryMap Map<String, String> params);

    /**
     * 下单
     *
     * @param route
     * @return
     */
    @Headers({"Content-type:application/json;charset=UTF-8"})
    @POST("pay/buy")
    Call<ResultEntity> buyProduct(@Body RequestBody route);

    /**
     * 继续下单
     *
     * @param orderNo
     * @param params
     * @return
     */
    @POST("pay/continue/{orderNo}")
    Call<ResultEntity> continueBuyProduct(@Path("orderNo") String orderNo, @QueryMap Map<String, String> params);

    /**
     * 处理价格
     *
     * @param route
     * @return
     */
    @Headers({"Content-type:application/json;charset=UTF-8"})
    @POST("pay/dealPrice")
    Call<ResultEntity> dealPrice(@Body RequestBody route);

    /**
     * 购物车下单处理价格
     *
     * @param route
     * @return
     */
    @Headers({"Content-type:application/json;charset=UTF-8"})
    @POST("pay/dealCartPrice")
    Call<ResultEntity> dealCartPrice(@Body RequestBody route);

    /**
     * 购物车下单
     *
     * @param route
     * @return
     */
    @Headers({"Content-type:application/json;charset=UTF-8"})
    @POST("pay/cartBuy")
    Call<ResultEntity> cartBuyProduct(@Body RequestBody route);

    /**
     * 广告
     *
     * @param params
     * @return
     */
    @GET("initPage/get")
    Call<ResultEntity> getAdpage(@QueryMap Map<String, String> params);

    /**
     * 获取首页栏目
     *
     * @param params
     * @return
     */
    @GET("column/get")
    Call<ResultEntity> getColumn(@QueryMap Map<String, String> params);

    /**
     * 获取首页栏目数据
     *
     * @param params
     * @return
     */
    @GET("column/dataByColumn/{columnId}")
    Call<ResultEntity> getColumnData(@Path("columnId") String columnId, @QueryMap Map<String, String> params);

    /**
     * 搜索商品
     *
     * @param params
     * @return
     */
    @GET("column/productForApp")
    Call<ResultEntity> searchProduct(@QueryMap Map<String, String> params);

    /**
     * 搜索店铺
     *
     * @param params
     * @return
     */
    @GET("column/storeForApp")
    Call<ResultEntity> searchStore(@QueryMap Map<String, String> params);

    /**
     * 获取收藏
     *
     * @param params
     * @return
     */
    @GET("favorite/get")
    Call<ResultEntity> getFavorite(@QueryMap Map<String, String> params);

    /**
     * 添加收藏
     *
     * @param params
     * @return
     */
    @POST("favorite/add")
    Call<ResultEntity> addFavorite(@QueryMap Map<String, String> params);

    /**
     * 删除收藏
     *
     * @param params
     * @return
     */
    @POST("favorite/del")
    Call<ResultEntity> deleteFavorite(@QueryMap Map<String, String> params);

    /**
     * 获取店铺栏目
     *
     * @param params
     * @return
     */
    @GET("storeColumns/get")
    Call<ResultEntity> getStoreColumns(@QueryMap Map<String, String> params);

    /**
     * 获取店铺栏目数据
     *
     * @param columnId
     * @param params
     * @return
     */
    @GET("storeColumns/dataByColumn/{columnId}")
    Call<ResultEntity> getStoreColumnData(@Path("columnId") String columnId, @QueryMap Map<String, String> params);


    /**
     * 获取城市
     *
     * @param params
     * @return
     */
    @GET("region/get")
    Call<ResultEntity> getCities(@QueryMap Map<String, String> params);

    /**
     * 获取商企栏目
     *
     * @param params
     * @return
     */
    @GET("samqiColumns/get")
    Call<ResultEntity> getSamqiColumns(@QueryMap Map<String, String> params);

    /**
     * 获取商企栏目数据
     *
     * @param params
     * @return
     */
    @GET("samqiColumns/dataByColumn/{columnId}")
    Call<ResultEntity> getSamqiColumnsData(@Path("columnId") String columnId, @QueryMap Map<String, String> params);

    /**
     * 热门搜索
     *
     * @param params
     * @return
     */
    @GET("hotword/get")
    Call<ResultEntity> getHotwords(@QueryMap Map<String, String> params);

    /**
     * 店铺详情
     *
     * @param params
     * @return
     */
    @GET("store/detail/{storeNo}")
    Call<ResultEntity> getStoreDetail(@Path("storeNo") String storeNo, @QueryMap Map<String, String> params);

    /**
     * 店铺中取消收藏
     *
     * @param params
     * @return
     */
    @POST("favorite/detail/cancel")
    Call<ResultEntity> cancelDetailFavorite(@QueryMap Map<String, String> params);
}
